const Mock = require('mockjs')
const { createAccount } = require('../services/accountService')
//定义账户数据
const accoutData = Mock.mock({
  'data|20-30': [
    {
      name: '@first',
      password: '@integer(100000,999999999999)',
      juri: '@integer(0,2)',
    },
  ],
})

// 添加固定测试用户
const fixedUsers = [
  {
    name: 'user1',
    password: '123456',
    juri: 0, // 普通用户
  },
  {
    name: 'admin1',
    password: 'admin123',
    juri: 1, // 交通管理员
  },
  {
    name: 'superadmin',
    password: 'super123',
    juri: 2, // 系统管理员
  },
]
//导出数据
accoutData.data.forEach((s) => {
  createAccount(s)
})

// 创建固定测试用户
fixedUsers.forEach((user) => {
  createAccount(user)
})
